<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.sun.javafx.collections.MappingChange.Map"%>
<%@ page import="com.hehe.entity.Evaluation" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留言板</title>
<style type="text/css">
li {float:left;  list-style: none;}
img {
	padding: 2px;
}
</style>
</head>
<body>

	<%
		String[] imgs = { "/Hehe/pro/images/kj.png",
				"/Hehe/pro/images/kj.png",
				"/Hehe/pro/images/kj.png"};
		ArrayList<Evaluation> list = new ArrayList<>();
		for (int i = 1; i < 10; i++) {
			list.add(new Evaluation(i, "五星好评",imgs, new Date()));
		}
	%>
	<%
		for (int i = 0; i < list.size(); i++) {
			SimpleDateFormat adf = new SimpleDateFormat("yyyy年MM月dd日  HH时mm分");
			String date = adf.format(list.get(i).getDate());
	
			
	%>
	<div class="panel panel-info">
		<div class="panel-heading">
			<h3 class="panel-title">用户<%=list.get(i).getUserid() %> &nbsp;
			<span><small><%=date%></small></span></h3>
			
		</div>
		<div class="panel-body">
			<div>
				<p><%=list.get(i).getContent()%></p>
			</div>
			<div>
			<ul>
			<%for(int j=0; j<imgs.length; j++){%>
				<li>
					<img alt="img" src="<%=imgs[j]%>" width="50px" height="50px">
				</li>
			<%} %>
			</ul>
		
			</div>
		
		</div>
	</div>
	<%
		}
	%>
</body>
</html>